package com.okonna.selenium.tide.eventhandlers.menuevents;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Shell;

import com.okonna.selenium.tide.Application;
import com.okonna.selenium.tide.views.ConfigView;

public class OptionsListener implements SelectionListener
{
	private Application app;
	private Shell shParent;
	
	public OptionsListener(Application tmpApp, Shell tmpParent)
	{
		app = tmpApp;
		shParent = tmpParent;
	}
	
	@Override
	public void widgetSelected(SelectionEvent event) 
	{
    	ConfigView swtConfigView = new ConfigView(app, shParent);
    	final Shell shConfig = swtConfigView.initView();
    	shConfig.open();
	}

	@Override
	public void widgetDefaultSelected(SelectionEvent event) 
	{
    	System.out.println("WTF does 'widgetDefaultSelected(SelectionEvent event)' do?");
		
	}

}
